home *** CD-ROM | disk | FTP | other *** search
/ ftp.whtech.com / ftp.whtech.com.7z / ftp.whtech.com / datasheets and manuals / Hardware / WHT / scsi / dsr_sources_2_2001 / bankit2 < prev    next >
Encoding:
Text File  |  2006-10-19  |  1.8 KB  |  55 lines

  1. * BANKIT2
  2.  
  3. * This is the main BANKIT routine, and is to be placed in RAM by the powerup
  4. * routine. We may move this routine to RAM on every DSR call, we'll see how
  5. * it goes. See BANKIT;S for more details on the banking routines.
  6. *
  7. * By Brad Snyder for the WHT SCSI Adaptor. 12-23-94.
  8. * Updated 12-28-94 bls
  9. * debug 1-2-95 bls - not finding correct jump address at beginning of banks
  10. * debug 1-3-95 bls - using R0 to index into jump table. TI not happy.
  11. * modify 1-6-95 bls - added stack for bankit to use. Of course, all addresses
  12. *                     changed.
  13. * modify 1-17-95 bls - moved stack handler to rom
  14. *
  15. * BNKST  is currently at >5DD6
  16. * BANKWS is currently at >5DB6
  17.  
  18. * Note: the CRU base of the SCSI card has been loaded into BANKWS R12 by the
  19. *       powerup routine.
  20.  
  21. BNKST  AI   R12,8*2           point to mapper
  22.        LDCR R1,4              map in requested bank of eprom
  23.        AI   R12,-8*2
  24.        ANDI R1,>00FF          make it just the offset
  25.        SLA  R1,1              *2
  26.        MOV  @>4000(R1),R1     get address
  27.        B    *R1               branch to called routine
  28.  
  29. * Branch or BL to here to return to caller. Must have RAM bank 0 active first!
  30.  
  31.        AI   R12,8*2           return to caller
  32.        LDCR R10,4             map caller's bank back in
  33.        AI   R12,-8*2          restore R12
  34.        RTWP                   BACK to caller
  35.  
  36. BNKEND EQU  $
  37. BRAD   EQU  >5DD6             address to load banking code into
  38.  
  39. * Code to return from the DSR from any rom bank. Also copied to ram at
  40. * powerup. Maps in ROM 0 and returns to TI OS.
  41. *
  42. * By David Nieters 02-10-95
  43.  
  44. DSRRT1 ANDI R12,>FF00
  45.        AI   R12,8*2           point to ROM mapper
  46.        CLR  R1
  47.        LDCR R1,4              map in ROM bank 0
  48.        ANDI R12,>FF00         restore R12
  49.        MOV  @SAVR1,R1
  50.        MOV  @SAVR11,R11
  51.        INCT R11
  52.        RT                     28 bytes
  53. DSRRT2 EQU  $
  54.  
  55.